package designMode.factory.abstractFactory;

import designMode.factory.abstractFactory.impl.ali.AliOrderFactory;
import designMode.factory.abstractFactory.impl.wechat.WechatOrderFactory;

/**
 * @    超级工厂，创建工厂的工厂
 * @Author 肖地洋
 * @Date 2022/8/13 11:31
 */
public class FactoryProducer{
    public static OrderFactory createOrderFactory(String type){
        if(type.equalsIgnoreCase("ALI")){
            return new AliOrderFactory();
        }else if(type.equalsIgnoreCase("WECHAT")){
            return new WechatOrderFactory();
        }else{
            return null;
        }
    }
}
